package presentation;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

/*
 * GesturesPanel represents the screen where all the possible gestures for the game are shown to the users.
 * 
 */
public class GesturesPanel extends JPanel {
	
	//background image
	public ImageIcon background2 =
			new ImageIcon("gamebackground1.jpg");

	/**
	 * Create the panel.
	 */
	public GesturesPanel() {
		this.setLayout(null);
		
		//add the image with the different gestures
		JPanel ip = new JPanel();
		JLabel image = new JLabel(new ImageIcon("Different_gestures_screen.jpg"));
		image.setLocation(0, 0);
		image.setSize(800, 300);
		ip.add(image);

		ip.setLayout(null);
		ip.setLocation(100, 100);
		ip.setSize(800, 300);
		this.add(ip);


		JPanel gest = new JPanel();
		JLabel gestLabel = new JLabel("Different possible gestures" );
		gestLabel.setLocation(5,0);
		gestLabel.setSize(165, 30);
		gest.add(gestLabel);
		gest.setLayout(null);
		gest.setLocation(390, 0);
		gest.setSize(165, 30);


		this.add(gest);
	}

	//Set the background image and the size
	@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g);
		g.drawImage(background2.getImage(), 0, 0, null);
	}

	@Override
	public Dimension getPreferredSize() {
		return new Dimension(
				background2.getImage().getWidth(null),
				background2.getImage().getHeight(null));
	}


}
